<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>
    <div class="cf">

        <if condition="F('defaultMenuSet') neq 'published'">
            <div class="alert alert-warning alert-block">
                <h4>注意！您还没有生成默认菜单</h4>
                <p>要使用个性化菜单，则必须设置和生成默认菜单到微信公众号，请点击左侧默认菜单先配置和生成再来操作个性化菜单。</p>
            </div>
            <div class="fl">
                <span class="btn disabled" >新增个性化菜单</span>
                <span class="btn disabled" >批量发布</span>
                <span class="btn disabled" >批量删除</span>
            </div>
        <else />
            <div class="fl">
                <a class="btn" href="{:U('addMenuList')}">新增个性化菜单</a>
                <button class="btn ajax-post confirm" target-form="ids" url="{:U('publishMenuList')}">批量发布</button>
                <button class="btn ajax-post confirm" target-form="ids" url="{:U('delMenuList')}">批量删除</button>
            </div>
        </if>
    </div>
    <div class="cf">
        <!-- 数据表格 -->
        <div class="data-table">
            <table class="">
                <thead>
                <tr>
                    <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                    <th class="">编号</th>
                    <th class="">名称</th>
                    <th class="">适用标签</th>
                    <th class="">适用性别</th>
                    <th class="">适用国家</th>
                    <th class="">适用省份</th>
                    <th class="">适用城市</th>
                    <th class="">适用操作系统</th>
                    <th class="">适用语言</th>
                    <th class="">发布状态</th>
                    <th class="">创建时间</th>
                    <th class="">更新时间</th>
                    <th class="">操作</th>
                </tr>
                </thead>
                <tbody>
                <volist name="_list" id="vo">
                    <tr>
                        <td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}"/></td>
                        <td>{$vo.id}</td>
                        <td>{$vo.title}</td>
                        <td>{$vo.tag_id}</td>
                        <td>{$vo.sex}</td>
                        <td>{$vo.country}</td>
                        <td>{$vo.province}</td>
                        <td>{$vo.city}</td>
                        <td>{$vo.client_platform_type}</td>
                        <td>{$vo.language}</td>
                        <td>{$vo.status}</td>
                        <td>{$vo.create_time|time_format}</td>
                        <td>{$vo.update_time|time_format}</td>
                        <td>
                            <eq name="vo['status']" value="未发布">
                                <a href="{:U('publishMenuList?id='.$vo['id'])}" class="confirm ajax-get">发布</a>
                            </eq>
                            <a href="{:U('editMenuList?id='.$vo['id'])}">编辑</a>
                            <a href="{:U('viewMenu?id='.$vo['id'])}">配置</a>
                            <a href="{:U('delMenuList?id='.$vo['id'])}" class="confirm ajax-get">删除</a>
                        </td>
                    </tr>
                </volist>
                </tbody>
            </table>


        </div>

        <!-- 分页 -->
        <div class="page">
            {$_page}
        </div>

</block>

<!-- 加载底部JS -->
<block name="script">
    <include file="Public/footjs"/>
</block>
